<template>
  <div class="all">
    <!-- teleport 使用to属性将包裹的组件放在指定的div下面，改变dom层级  -->
    <Teleport to="body">
        <demo></demo>
    </Teleport>
   
  </div>
</template>

<script setup lang="ts">
import demo from './compontent/demo.vue';
import { ref, reactive, toRefs, onMounted} from 'vue'

</script>
<style scoped lang="scss">
.all{
    width: 100%;
    height: 50vh;
    background-color: yellow;
}
</style>